/*
 * TMP431.h
 *
 * Created: 2012-06-02 20:43:59
 *  Author: Sebastian_2
 */ 


#ifndef TMP431_H_
#define TMP431_H_

#include "XMEGA.h"

#define TMP431_ADDR			0x4d // shift 1 bit right because for some weird reason TWI driver wants it this way //0b10011010
#define TMP431_LOCAL_HI		0x00
#define TMP431_LOCAL_LO		0x15
#define TMP431_REMOTE_HI	0x01
#define TMP431_REMOTE_LO	0x10
#define TMP431_CONF1		0x09
#define TMP431_CONF2		0x1A
#define TMP431_CONV_RATE	0x0A
#define TMP431_ONE_SHOT		0x0F

void TMP431_Init();
void TMP431_ReadLocalTemp();
void TMP431_ReadRemoteTemp();



#endif /* TMP431_H_ */